<?php
$this->pageTitle = Yii::app()->name;
$this->breadcrumbs=array(
	'包裹查询',
);
include_once('menu.php');
?>
<div style="text-align:right;"><a href="<?=Yii::app()->createUrl('admin/exportShipDetail',array('tracking'=>$tracking))?>" target="_blank"><img src="images/down.png" border="0" /></a></div>
<table cellspacing="0" cellpadding="0" width="100%" class="tbl" style="float:left;">
	<tr class="head">
		<td width="20%">货柜编号（快递单号）</td>
		<td width="15%">产品编号</td>
		<td width="45%">产品细节</td>
		<td width="10%">订购数量</td>
		<td>运出数量</td>
	</tr>
	<?php
    $i = 0;
    $cssArr = array(0 => 'even', 1 => 'odd', 2 => 'three');
    foreach ($rowTable as $item) {
        $trClass = $cssArr[$i % 3];
        $i++;
		$detail = '';
		if($item->ProductID){
			$detail = $item->product->ProductDetail;
		}else{
			$detail = $item->ProductName;
		}
        ?>
	<tr class="<?= $trClass ?>">
		<td>
			<?=$item->ship->Tracking?>
		</td>
		<td>
			<?=$item->ProductModel?>
		</td>
		<td>
			<?=$detail?>
		</td>
		<td style="text-align:center;">
			<?=$item->OrderQuantity?>
		</td>
		<td style="text-align:center;">
			<?=$item->ShipmentQuantity?>
		</td>
	</tr>
	<?php
    }
    ?>
</table>